/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package negocio;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Dvid
 */
@Embeddable
public class HabitoFichaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "habitoid")
    private int habitoid;
    @Basic(optional = false)
    @Column(name = "fichaid")
    private int fichaid;

    public HabitoFichaPK() {
    }

    public HabitoFichaPK(int habitoid, int fichaid) {
        this.habitoid = habitoid;
        this.fichaid = fichaid;
    }

    public int getHabitoid() {
        return habitoid;
    }

    public void setHabitoid(int habitoid) {
        this.habitoid = habitoid;
    }

    public int getFichaid() {
        return fichaid;
    }

    public void setFichaid(int fichaid) {
        this.fichaid = fichaid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) habitoid;
        hash += (int) fichaid;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HabitoFichaPK)) {
            return false;
        }
        HabitoFichaPK other = (HabitoFichaPK) object;
        if (this.habitoid != other.habitoid) {
            return false;
        }
        if (this.fichaid != other.fichaid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "negocio.HabitoFichaPK[ habitoid=" + habitoid + ", fichaid=" + fichaid + " ]";
    }
    
}
